#!/bin/bash
for i in `find ./ -type f -name *.bak`
do
    # newname=`echo $i| awk -F'.bak' '{print $1}'`
    newname=`echo $i| sed 's/\.bak$//g'`
    mv $i $newname
done